package org.academic.texteditor.gui.helper;

import java.util.ArrayList;
import java.util.List;

public final class ClipboardManager {

	private static ClipboardManager instance;
	private List<String> content = new ArrayList<String>();

	private ClipboardManager() {
		
	}
	
	public static synchronized ClipboardManager getInstance() {
		if (instance == null) {
			instance = new ClipboardManager();
		}
		return instance;
	}

	public void copy(String text) {
		content.add(text);
	}

	public void remove(String text) {
		content.remove(text);
	}

	public void remove(int index) {
		content.remove(index);
	}
	
	public String paste(int index) {
		return content.get(index);
	}

	public List<String> getContent() {
		return content;
	}
	
}
